
goog.provide('gaillard.utils');

gaillard.utils.encodePostDataToString = function (data) {
    var ret = [],
        key;        
    for (key in data) {
        ret.push(key+'='+data[key]);
    }
    return ret.join('&');
};

(function () {

	var templateRegExp = new RegExp("{{(.*?)}}", "g");
	
	gaillard.utils.renderTemplate = function(template, data) {
		return template.replace(templateRegExp, function (match, name) {
			return data[name];
		});
	};
})();